package com.woniuxy.oldobject.service.impl;

import com.woniuxy.oldobject.dao.SalaryDao;
import com.woniuxy.oldobject.entity.ResponseEntity;
import com.woniuxy.oldobject.entity.SalaryRecords;
import com.woniuxy.oldobject.service.SalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SalaryServiceImpl implements SalaryService {
    @Autowired(required = false)
    SalaryDao salaryDao;

    @Override
    public ResponseEntity findAll() {
        List<SalaryRecords> salaryRecordsList = salaryDao.selectAll();
        if (salaryRecordsList.size() >= 0) {
            return new ResponseEntity(200,"查询成功",salaryRecordsList);
        }else{
            return ResponseEntity.ERROR;
        }

    }
}
